package com.crimax.lanproj.controller;
import java.io.IOException;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.servlet.ModelAndView;


public abstract class  publishDoc extends ReadAbleController {
  protected final Log logger = LogFactory.getLog(getClass());
 
  String docText ="";
  String docTextHeader ="";
  String docTextHeader2 ="";
  String docMeta ="";
  String docTitle ="";
  
  public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
	  
	    logger.info("publish");
	    
	    this.setReqDoc(request);

	    this.setInitState();
	    this.setUpDefault(request);
	    
	    request.setAttribute("docText",docText);
	    request.setAttribute("docTextHeader",docTextHeader);
	    request.setAttribute("docMeta", docMeta);
	    request.setAttribute("docTitle", docTitle);
	    request.setAttribute("start","4");

	    return new ModelAndView("lanasnabbt.jsp");
  }
  

	@Override
	public void setServletContext(ServletContext arg0) {
		servletContext = arg0;
		
	}
	
	protected void setInitState() {
		this.initState = false;
		
	}

	protected abstract void setReqDoc(HttpServletRequest request)throws IOException;
} 